<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="/js/echarts.min.js"></script>
    <script type="text/javascript" src="/js/jquery-3.5.1.min.js"></script>
<body>
<div id="main" style="width: 700px;height:600px;">

</div>

</body>
<script>
    var myChart = echarts.init(document.getElementById('main'));
    $.get("/reg/dateStat" , function (backdata) {
        myChart.setOption( {
            title: {
                text: '一周预约情况',
                left: 'center'
            },

            tooltip: {
                trigger: 'axis'
            },
            xAxis: {
                type: 'category',
                boundaryGap: false,
                data: backdata.data.date
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    name: '预约人数',
                    type: 'line',
                    stack: 'Total',
                    data: backdata.data.num,
                }
            ]
        } )
    })
</script>
</html>